package com.hjc.springbootstudyweb.tools;

import java.util.UUID;

/**
 * Created by IntelliJ IDEA.
 * User: HJC
 * Date: 2019/12/2
 * Time: 19:47
 * To change this template use File | Settings | File Templates.
 */
public class UUId {
    //Holder
    private static class UUIdHolder{
        private static UUId uuId = new UUId();
    }

    private UUId(){}

    public static UUId getInstance(){
        return UUIdHolder.uuId;
    }

    public String getUUId(){
        return UUID.randomUUID().toString().replaceAll("-","");
    }
}
